-
-
Notifications
You must be signed in to change notification settings - Fork 347
Add guidelines for commit messages #149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Sandro-Alessio Gierens <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect 👍 that document was a little bare. I had just written something up yesterday too in my local repo, so I just made it into a gist.
Maybe either add a link to that
https://gist.github.com/PThorpe92/103cdf8201ae5cd6ee1d426a71010c83#file-eza_commits-md
or honestly you covered everything there so you could just link to
https://www.conventionalcommits.org/en/v1.0.0/
somewhere in there just to specify that we use the conventional commits standard.
|
Ah, thank's for the hints ... but now I'm actually wondering, if I'm not reinventing the wheel, since https://www.conventionalcommits.org/en/v1.0.0/ covers this in much more detail. so maybe this link and an example would be enough? Another question, do we actually want to link v1.0.0 ... or better https://www.conventionalcommits.org/en/ since it automatically links to the most recent version. |
Good catch, that's the way to go.
Personally I like seeing a nicely formatted markdown document with examples and a good description of what projects want their commit messages to look like. The link is important for sure for the whole specification, but if you look at the gist I made, to see examples of specific changes and how they would relate to the project is nice to have. It's up to everyone, but even just adding the link to what you have already would work just fine. |
|
Yeah, you are right I like that as well ... better than having to read specifications or skim recent contributions to get a clue. I will have a look at everything again, the link, your suggestion, my suggestion, and try to come up with a short yet precise description of what is desired from our side with special focus on the type definitions and project related examples. |
|
Agree on using https://www.conventionalcommits.org/en/ so we're automatically I want to hear what both of you, as contributors, find the most useful, but my That way, we have a shorter digestible version from people that have already Also, one thing I would like to note that @mentalisttraceur made me aware of.
I think beyond just screen readers, it would just make sense if we made a Also, for the part about "trailers" (as I found out they are called just now), |
|
Re: "should we link v1.0.0 or the most recent version" I would specify v1.0.0 - same reasoning as for pinning versions of dependencies. So that
|
|
Conventional Commits also really ought to provide a standard way of declaring+detecting what version of the spec is being followed in a repo for any given commit. After thinking through a few designs, here's the standard I would propose (posting it here for initial feedback, but I'll probably post it as a proposal in the Conventional Commits repo soon): The project adds a (In a precise spec I'd probably mandate that this string must be in UTF-8/ASCII, to reduce the odds that one popular implementation goes looser and all tools end up having to know how to detect or interpret other byte patterns.) (For a proper spec, note that language identifiers are not always just two characters like Advantages/rationale: Both tools and humans can know if Conventional Commit semantics apply to a commit, and which exact version. We can even know this with per-commit granularity by checking just the start of that file's contents for a given commit (for those who don't know, something like By keeping it super simple (the version string and the URL string are one, it's the very first thing in the file by itself on the first line, there is no markdown syntax to parse, etc), we make it extremely simple+easy for tools to know what version of the spec is being used, humans can still see and understand a URL (and the markdown extension helps editors/viewers automatically style it as a link, make it clickable, etc), and there's a clear single source of truth. By making the spec explicitly about the first line (so tools just look at the first line and ignore/tolerate the rest), it allows forward-compatibility with future spec changes or other unforeseen uses adding other information. Discoverability is really high because it looks like one of the conventional about-this-repo files (all-uppercase, like README, CONTRIBUTING, etc), it points you right to the full documentation of that commit convention. It would also sort in basically the same place as a CONTRIBUTING file in an alphabetic listing - if I was looking for a "contributing" file and saw a "committing" file (as a dev who already knows what a "commit" is) I'd almost certainly think to look in it. |
|
Moving to #160, as it's not something we'd need to consider for this pull request.
|
Signed-off-by: Christina Sørensen <[email protected]>
cafkafk
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't perfect, but there's no reason to wait merging this until it is. It's better to have something than nothing, specially so I can direct new contributors to it.
Since it took me a moment to notice and grasp it myself how commit messages were altered on my PRs, I though I'd add some guidelines to
CONTRIBUTING.mdso contributors already try to use the wanted format and maintainers don't have to edit every single commit.Feel free to adjust it! I was just guessing these from my experience.